<link rel="stylesheet" type="text/css" href="<?= base_url() ?>file/js/easyui/themes/gray/easyui.css">
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>file/js/easyui/themes/icon.css">

<script type="text/javascript" src="<?= base_url() ?>file/js/easyui/jquery.easyui.min.js"></script>
<!--dialog-->

<link rel="stylesheet" href="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/themes/ui-lightness/jquery.ui.all.css">
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/jquery-1.7.1.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/jquery.bgiframe-2.1.2.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.core.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.widget.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.mouse.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.button.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.draggable.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.position.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.resizable.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.ui.dialog.js"></script>
<script src="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/ui/jquery.effects.core.js"></script>

<script type="text/javascript">
$(document).ready(function() {
	
	//proses field pHO
	$('div#pHO').dialog({ 
		autoOpen: false, width: 600, height: 300, modal: true, resizable: false,
			buttons: {
				'Ok': function() {
					$( '#ajaxLoadAni' ).fadeIn( 'slow' );
					$( this ).dialog( 'close' );
					
				},
			},
	});	
	$('#hoImg').click(function(){
		
		$('div#pHO').dialog('open'); 
	});
	
	//proses field pCluster
	$('div#pCluster').dialog({ 
		autoOpen: false, width: 600, height: 300, modal: true, resizable: false,
			buttons: {
				'Ok': function() {
					$( '#ajaxLoadAni' ).fadeIn( 'slow' );
					$( this ).dialog( 'close' );
					
				},
			},
	});	
	$('#clusterImg').click(function(){
	
		$('div#pCluster').dialog('open'); 
	});
})
</script>

<!--------------------------------------------------------------------------------------------------------------------------------------->







<div class="box">
	
	 <!-- box / title -->
	<div class="title">
			<h5>Sell Out</h5>
			<ul class="links">
					<!-- <li><a href="<?=base_url().'index.php/sell_out/newsell_out'?>">Create Sell Out</a></li>
					<li><a href="<?=base_url().'index.php/sell_out'?>">List Sell Out</a></li> -->
			</ul>
	</div>

	<div class="table">
       
	<div class="panel-wrap" style="height: auto">
		
		<div class="panel-header-div">Cluster Information</div>
		<div class="panel-body-div">
			<div class="left-panel-body">
				<h2><?=$ter_name?></h2>
			</div>
			
		</div>
	</div>

	
	
<div class="panel-wrap" style="height: auto">
	<div class="panel-header-div">Order Information</div>
    <div class="panel-body-div">
        <div class="child-panel-body">
			<div class="left-panel-body">
				<div class="form">
                        <div class="fields">
                                <div class="field">
                                        <div class="label" style="margin-left:3%">
                                            <label for="date">Date:</label>
                                        </div>
                                        <div class="input">
											<input disabled="disabled" class="small" type="text" id="date" value="<?php echo date("d M Y", strtotime($sellout->created_on)) ?>"/>
                                        </div>
                                </div>
                                <div class="field">
                                        <div class="label" style="margin-left:3%">
                                                <label for="sales_person">Sales Person:</label>
                                        </div>
                                        <div class="input">
											<input disabled="disabled" type="text" id="sales_person" class="small" value="<?= $sales_name?>" />																			
                                        </div>
                                </div>
								<div class="field">
                                        <div class="label" style="margin-left:3%">
                                                <label for="outlet_name">Channel Name:</label>
                                        </div>
                                        <div class="input">
                                            <input disabled="disabled" type="text" id="outlet_name" class="small" value="<?=$outlet_name?>"/>
                                        </div>
                                </div>        


								

                               
                        </div>
                </div>
				
				
				
			</div>
		</div>
	
	<div class="summary"></div>
	
    <div class="child-panel-body" style="margin-top: 1%;">	
            <table id="table-updateable" class="table-right-panel" width="92%" style="margin-left: 19px;">
                <thead>
					<tr align="center" class="tr-colour3">
						<th>No.</th>
						<th>ICCID</th>
						<th>Description</th>
						<th>Item Group</th>
						<th>Price (Rp.)</th>
					</tr>
				</thead>
				<tbody>
					<?php
						
						for($ii=0; $ii<count($sellout_detail); $ii++)
						{
							$nomor = $ii+1;
							echo "<tr align='center' class='wide'>";
							echo "<td style='text-align:center;font-size: 1.3em;'><div style='margin-left:5%'>" . $nomor . "</div></td>" ;
							echo "<td style='text-align:left;font-size: 1.3em;'><div style='margin-left:5%'>" . $sellout_detail[$ii]['iccid'] . "</div></td>" ;
							echo "<td style='text-align:left;font-size: 1.3em;'><div style='margin-left:5%'>" . $itemDetail[$ii][0]['item_name'] . "</div></td>" ;
							echo "<td style='text-align:left;font-size: 1.3em;'><div style='margin-left:5%'>" . $itemDetail[$ii][0]['item_group_name'] . "</div></td>" ;
								
							$price = $this->msell_out->getPrice($sellout_detail[$ii]['iccid'], $sellout->sales_id);
							
							echo "<td style='text-align:right;font-size: 1.3em;'>" . number_format($price, 2, "," , ".") . "</td>" ;
							echo "</tr>";
						}
					?>
				</tbody>
                
            </table>
				
            <div class="summary"> 
            </div>
            
        
    </div>
    
    
        <div class="child-panel-body-2">
        
			<div class="buttons-2" style="margin: 0 auto">
				<input type="button" value="Back" onclick="location.href='<?=base_url().'index.php/sell_out'?>'" />
			</div>
		</div>
		
    </div>
</div>